package com.yangl.corejava.thread.threadpool;

/**
 * Created by yangl on 2017/2/23.
 */
public class MyThread extends Thread {

    private String name;

    public MyThread(){};

    public MyThread(String name){
        this.name = name;
    }

    @Override
    public void run() {
        try {
            Thread.sleep(1000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println(Thread.currentThread().getName() + "------" + name + "正在运行。。。");
        for(int i=1;i<100;i++){
            System.out.println(Thread.currentThread().getName() + "------" + name + "的i为" + i);
        }
    }
}
